package edu.sctu.nieyu.day20150514.textone;

/**
 * Created by user01 on 2015/5/14.
 */
public class Text {

    private String name = "Tom";

    public void message(){

        class Inner {
            int age;
            String sex;

            public void getAge() {
                age = 18;
            }

            public void getSex() {
                sex = "男";
            }

        }
        Inner inner = new Inner();
        inner.getAge();
        inner.getSex();
        System.out.println("姓名："+name+"年龄："+inner.age+"性别："+inner.sex);

    }
    public static void main(String[] args) {
        Text text = new Text();
        text.message();

    }
}


